home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 4.6 KB | 179 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWResFil.cpp
- // Release Version: $ 1.0d11 $
- //
- // Copyright: 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWOS.hpp"
-
- #ifndef FWRESFIL_H
- #include "FWResFil.h"
- #endif
-
- #ifndef FWSTRS_H
- #include "FWStrs.h"
- #endif
-
- #ifndef FWFILESP_H
- #include "FWFileSp.h"
- #endif
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifndef FWPRIDEB_H
- #include "FWPriDeb.h"
- #endif
-
- //----------------------------------------------------------------------------------------
- // Mac-only
- //----------------------------------------------------------------------------------------
- #ifdef FW_BUILD_MAC
-
- #pragma segment ResourceFile
-
- #ifndef __ERRORS__
- #include <errors.h>
- #endif
-
- #ifndef __TOOLUTILS__
- #include <ToolUtils.h>
- #endif
-
- #ifndef __RESOURCES__
- #include <Resources.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
- #ifndef __STRING__
- #include <string.h>
- #endif
-
- #ifndef __MEMORY__
- #include <Memory.h>
- #endif
-
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- #ifdef FW_BUILD_MAC
- // [HLX] Doesn't make much sens in an OpenDoc World
- //const FW_ResourceFileID FW_CResourceFile::gMacAppResFileID = ::CurResFile();
- #endif
-
- //========================================================================================
- // CLASS FW_CResourceFile
- //========================================================================================
-
- /*
- // [HLX] Doesn't make much sens in an OpenDoc World
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::GetAppResourceFileID
- //----------------------------------------------------------------------------------------
-
- FW_ResourceFileID FW_CResourceFile::GetAppResourceFileID()
- {
- #ifdef FW_BUILD_MAC
- return gMacAppResFileID;
- #elif defined FW_BUILD_WIN16
- int i;
- return HIWORD(&i) - 1;
- #elif defined FW_BUILD_WIN32
- return ::GetModuleHandle(NULL);
- #endif
- }
- */
-
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::FW_CResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_CResourceFile::FW_CResourceFile() :
- fRep()
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::FW_CResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_CResourceFile::FW_CResourceFile(const FW_CFileSpecification& newFileSpec) :
- fRep(new FW_CPrivResourceFileRep(newFileSpec))
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::FW_CResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_CResourceFile::FW_CResourceFile(const FW_CResourceFile& other) :
- fRep(other.fRep)
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::FW_CResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_CResourceFile::FW_CResourceFile(FW_ResourceFileID resFileID) :
- fRep(new FW_CPrivResourceFileRep(resFileID))
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::FW_CResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_CResourceFile::FW_CResourceFile(FW_CPrivResourceFileRep *rep) :
- fRep(rep)
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CResourceFile::~FW_CResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_CResourceFile::~FW_CResourceFile()
- {
- FW_START_DESTRUCTOR
- }
-
-
- #if defined FW_BUILD_MAC
-
- //----------------------------------------------------------------------------------------
- // FW_CMacResLoadFalse::FW_CMacResLoadFalse
- //----------------------------------------------------------------------------------------
-
- FW_CMacResLoadFalse::FW_CMacResLoadFalse()
- {
- ::SetResLoad(false);
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CMacResLoadFalse::~FW_CMacResLoadFalse
- //----------------------------------------------------------------------------------------
-
- FW_CMacResLoadFalse::~FW_CMacResLoadFalse()
- {
- FW_START_DESTRUCTOR
- ::SetResLoad(true);
- }
- #endif
-